package org.adorsys.aderp.aderplogin.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.entity.RooJpaEntity;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaEntity
public class AderpPersonRef implements Serializable {

	private static final long serialVersionUID = 1L;

	@NotNull
    @Column(name = "personNumberBk", unique = true)
    private String personNumber;

	/**
	 * Used to maintain the reference to the last auditRecord.
	 */
    private String externalRef;

    private String firstName;

    private String lastName;

    private String email;

    private String genderKey;

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern = "dd-MM-yyyy")
    private Date dob;
    
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern = "yyMMddHHmmssSSZ")
    private Date lastUpdate = new Date();

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}
    
    
}
